<template>
  <div style="height: 300px; "><el-table

    :data="TransporttaskList"
    style="width: 100%;"
  >
    <el-table-column
      prop="id"
      label="任务编号"
      width="180"
    />
    <el-table-column
      prop="startAgency"
      label="起始地"
      width="130"
    />
    <el-table-column
      prop="endAgency"
      label="目的地"
      width="150"
    />    <el-table-column
      prop="licensePlate"
      label="车辆"
    />
    <el-table-column
      prop="status"
      label="任务状态"
    />

  </el-table></div>
</template>

<script>
import { Querydata } from '@/api/worktable'
export default {
  name: 'TransportTaskList',
  data() {
    return {
      TransporttaskList: [

      ],
      getTransporttaskList: {},
      scrollTop: 0
    }
  },
  computed: {

  },
  created() {
    this.Querydata()
  },
  methods: {
    async  Querydata() {
      this.getTransporttaskList = await Querydata()
      this.TransporttaskList = this.getTransporttaskList.transportTaskList
      console.log(this.TransporttaskList)
      this.scroll()
    },
    scroll() {
      setInterval(() => {
        if (this.scrollTop < this.$refs.tableContainer.scrollHeight) {
          this.scrollTop += 2 // 自定义滚动速度
        } else {
          this.scrollTop = 0
        }
      }, 2000)
    }
  }

}
</script>

<style>

.form-container {
  height: 200px; /* 设置容器高度 */
  overflow: hidden; /* 隐藏溢出内容 */
}
.has-gutter{
  height: 60px;
}
/* 表单样式 */
form {
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 5px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}
</style>
